package com.gxsyh.nantie.phone.provider.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/2/17
 * @time: 10:54
 * @Description:
 */
@Data
public class SelectDiscuss implements Serializable {
    /**
     * ID
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @Id
    @Column(name = "id")
    private Long id;

    /**
     * 评论正文
     */
    @Column(name = "content")
    private String content;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Column(name = "createTime")
    private Date createtime;

    /**
     * 创建评论的id
     */
    @Column(name = "username")
    private String username;

    private static final long serialVersionUID = 1L;
}
